package com.mmy.fta.cargo.server.enums;

/**
 * @author guohao.xie
 * @apiNote
 * @exportable
 * @since 2021/10/27
 */
public enum CarrierBlackboardSortEnum {
    //装货时间
    LOAD_TIME(0,"load_time"),
    //运费
    CARGO_FEE(1, "cargo_fee"),
    //公里数
    MILEAGE(2, "mileage");

    private int code;
    private String msg;

    private CarrierBlackboardSortEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public static CarrierBlackboardSortEnum getcarrierBlackboardSortEnum(Integer code) {
        if (null == code) {
            return null;
        } else {
            CarrierBlackboardSortEnum[] var1 = values();
            int var2 = var1.length;

            for(int var3 = 0; var3 < var2; ++var3) {
                CarrierBlackboardSortEnum carrierBlackboardSortEnum = var1[var3];
                if (carrierBlackboardSortEnum.code == code) {
                    return carrierBlackboardSortEnum;
                }
            }

            return null;
        }
    }



}
